﻿@using GameSchool.Models.AccountModels
@model GameSchool.ViewModels.Project.ResultsViewModel
@{
    ViewBag.Title = "Niðurstöulisti";
}
<h2>
    Niðurstöðulisti fyrir @Model.currentCourse.Code, @Model.currentCourse.Name, @Model.currentCourse.Semester.Year-@Model.currentCourse.Semester.SemesterOfYear</h2>
<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
<table class="table table-striped">
    <tr>
        <th>
            Nafn
        </th>
        <th>
            Einkunn
        </th>
        <th>
        </th>
    </tr>
    @foreach (var item in Model.ProjectReturnses.OrderBy(i => AccountProfile.GetProfileByUserId(i.StudentUserID).FullName))
    {
        <tr>
            <td>
                @Html.ActionLink(AccountProfile.GetProfileByUserId(item.StudentUserID).FullName, "Grade", new { id = item.ProjectReturnID, studentUserId = item.StudentUserID })
            </td>
            <td>
                @string.Format("{0:0.0}", item.Grade)
            </td>
            <td>
                @Html.ActionLink("Fara yfir verkefni", "Grade", new { id = item.ProjectReturnID, studentUserId = item.StudentUserID }, new { @class = "btn btn-mini" })
            </td>
        </tr>
    }
</table>
